package com.ruoyi.production.service.impl.regulator;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.production.mapper.regulator.RegulatorNameMapper;
import com.ruoyi.production.domain.regulator.RegulatorName;
import com.ruoyi.production.service.regulator.IRegulatorNameService;

/**
 * 调节剂名称Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-12
 */
@Service
public class RegulatorNameServiceImpl implements IRegulatorNameService
{
    @Autowired
    private RegulatorNameMapper regulatorNameMapper;

    /**
     * 查询调节剂名称
     *
     * @param regulatorNameId 调节剂名称ID
     * @return 调节剂名称
     */
    @Override
    public RegulatorName selectRegulatorNameById(Long regulatorNameId)
    {
        return regulatorNameMapper.selectRegulatorNameById(regulatorNameId);
    }

    /**
     * 查询调节剂名称列表
     *
     * @param regulatorName 调节剂名称
     * @return 调节剂名称
     */
    @Override
    public List<RegulatorName> selectRegulatorNameList(RegulatorName regulatorName)
    {
        return regulatorNameMapper.selectRegulatorNameList(regulatorName);
    }

    /**
     * 新增调节剂名称
     *
     * @param regulatorName 调节剂名称
     * @return 结果
     */
    @Override
    public int insertRegulatorName(RegulatorName regulatorName)
    {
        regulatorName.setCreateTime(DateUtils.getNowDate());
        return regulatorNameMapper.insertRegulatorName(regulatorName);
    }

    /**
     * 修改调节剂名称
     *
     * @param regulatorName 调节剂名称
     * @return 结果
     */
    @Override
    public int updateRegulatorName(RegulatorName regulatorName)
    {
        regulatorName.setUpdateTime(DateUtils.getNowDate());
        return regulatorNameMapper.updateRegulatorName(regulatorName);
    }

    /**
     * 批量删除调节剂名称
     *
     * @param regulatorNameIds 需要删除的调节剂名称ID
     * @return 结果
     */
    @Override
    public int deleteRegulatorNameByIds(Long[] regulatorNameIds)
    {
        return regulatorNameMapper.deleteRegulatorNameByIds(regulatorNameIds);
    }

    /**
     * 删除调节剂名称信息
     *
     * @param regulatorNameId 调节剂名称ID
     * @return 结果
     */
    @Override
    public int deleteRegulatorNameById(Long regulatorNameId)
    {
        return regulatorNameMapper.deleteRegulatorNameById(regulatorNameId);
    }
}
